package com.dgshanger.sanhxiaofeisc.mvp.contract;

import com.dgshanger.sanhxiaofeisc.entity.HomeEntity;
import com.dgshanger.sanhxiaofeisc.entity.NearbyItemEntity;
import com.xx.baseuilibrary.mvp.lcec.BaseMvpLcecView;
import com.xx.baseutilslibrary.network.rx.XxBaseHttpObserver;

import java.util.List;

/**
 * NearbyContract
 * 沉迷学习不能自拔
 * Describe：
 * Created by 雷小星🍀 on 2018/4/19 10:39.
 */

public interface NearbyContract {

    interface Model {
        /**
         * 加载分类数据
         */
        void loadCategory(XxBaseHttpObserver<List<HomeEntity.CategoryListBean>> httpObserver);

        /**
         * 加载商家数据
         */
        void loadMerchant(String location_name, String sort_distance, String user_longitude,
                          String user_latitude, String page, String sort_new, String sort_comment,
                          XxBaseHttpObserver<List<NearbyItemEntity>> httpObserver);
    }

    interface View extends BaseMvpLcecView<List<NearbyItemEntity>> {

        void upDateCategoryList(List<HomeEntity.CategoryListBean> list);

        void upDateAddMerchantList(List<NearbyItemEntity> list);

        void onDataFailure(String err);
    }


    interface Presenter {
        /**
         * 加载分类数据
         */
        void loadCategory();

        /**
         * 加载商家数据
         */
        void loadMerchant(boolean refresh,
                          String location_name, String sort_distance, String user_longitude,
                          String user_latitude, String page, String sort_new, String sort_comment);
    }
}
